package tgc.edu.tms.repository;

import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import tgc.edu.tms.custom.CommonRepository;
import tgc.edu.tms.entity.Student;

@Repository
public interface StudentRepository extends CommonRepository<Student, Integer>{

	Student findByUsername(String username);

	Student findByUsernameAndName(String username, String name);

	Student findByPhone(String number);

	Student findByAddrs(String addrs);
	@Query(value="select count(*) from student where tb_class_id=?1",nativeQuery=true)
	Integer findgeshu(Integer id);


}
